package com.xian.Z5动态规划.JZ70矩形覆盖;

/**
 * @Author: jjxian
 */
public class Solution {


    public int rectCover(int target) {
        if(target<=2){
            return target;
        }
        int[] dp = new int[target+1];
        dp[0] = 0;
        dp[1] = 1;
        dp[2] = 2;

        for(int i = 3;i<=target; i++){
            dp[i] = dp[i-1] + dp[i-2];
        }
        return dp[target];
    }
}
